How to install PHP 8.2 on Alma Linux 8

您所在的位置:网站首页 linux yum search How to install PHP 8.2 on Alma Linux 8

How to install PHP 8.2 on Alma Linux 8

#How to install PHP 8.2 on Alma Linux 8| 来源: 网络整理| 查看: 265

A quick rundown

Alma Linux is an Open Source, community-governed, and forever-free enterprise Linux distribution, focused on long-term stability, providing a robust production-grade platform. AlmaLinux OS is 1:1 binary compatible with RHEL® and pre-Stream CentOS.

Rocky Linux is a community enterprise operating system designed to be 100% bug-for-bug compatible with America’s top enterprise Linux distribution now that its downstream partner has shifted direction. It is under intensive development by the community. Rocky Linux is led by Gregory Kurtzer, founder of the CentOS project.

Prerequsities

Before we install PHP 8 on our server, we will need a few things.

A server running either Alma or Rocky Linux. (I’m using a dedicated server from Spin Servers.)A cup of hot tea or coffee.Step 1 — Update your system

Always a good first step would be to update your operating system to the latest version.

First, check for an update using the command below:

$ sudo dnf check-update

If an update is found, run this command to update the OS.

$ sudo yum update -y

After the update, run the check-update command again to ensure the system is up-to-date.

$ sudo yum update -y

Once the system is updated, reboot the system using:

$ sudo rebootStep 2— Enable REMI Repository

Before we install PHP 8.2 on our system we need to install EPEL (extra packages for enterprise Linux). This provides us access to enterprise software packages.

Install EPEL:

$ sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

Install REMI:

$ sudo dnf -y install http://rpms.remirepo.net/enterprise/remi-release-8.rpm

update DNF cache:

$ sudo dnf makecache -y

List the repositories to ensure they are installed using the command below.

$ sudo dnf repolistNo alt text provided for this imageStep 3 — Install PHP 8.2

Now we can begin to install PHP 8.2 on our system.

First, let's reset the default PHP module.

$ sudo dnf module reset php -y

Enable the PHP 8.2 REMI module. Press the Y key and press enter to continue.

$ sudo dnf module install php:remi-8.2

Install PHP 8.2.

$ sudo dnf -y install php

Check that PHP is running and the correct version is installed by running the command:

$ php -vNo alt text provided for this image

At this point, PHP 8.2 has been successfully installed on your system. Typically PHP isn’t much use on its own as you will likely need modules like mbstring, openssl, and curl to name a few. You can install the addon modules in step 4.

Step 4 — Extend PHP using modules

To view a list of all the installable PHP modules use this command:

$ php -m

This will output a list as you see below.

No alt text provided for this image

Here you can pick which modules to install and use the command below with the modules you would like installed.

$ sudo dnf install php-{common,pear,cgi,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap}

Press the Y key and enter to continue the installation. Once the installation finishes you will have an Alma Linux 8 instance with PHP 8.2 installed.

In order to provide you with these short how-to’s, I use a dedicated server from Spin Servers. Below you will find a few offers from them for quality dedicated web hosting.

Intel E5–1280 v5 4 x 3.7 Ghz 32 GB DDR4 1 TB M.2 NVMe SSD 10 TB Bandwidth @ 10Gbps 1 IPv4 Address Dallas, TX Location $99 No Code Needed! https://www.spinservers.com/cart.php?a=add&pid=154 Dual E5–2630L v3 16 x 1.8 GHz 64GB DDR4 1.6 TB NVMe SSD 10TB Bandwidth @ 10Gbps 1 IPv4 Address Dallas, TX Location $139 Use Promo Code: WHT$13922 at checkout https://www.spinservers.com/cart.php?a=add&pid=130 Dual E5–260L v3 16 x 2.9 GHz Turbo 64GB DDR4 1.6TB NVMe SSD 10TB Bandwidth @ 10 Gbps 1 IPv4 Address San Jose, CA Location $139 Use Promo Code: SJC$40OFF at checkout https://www.spinservers.com/cart.php?a=add&pid=133

If you have questions about any of our services, please contact us via email at [email protected] or by using our live chat at spinservers.com.

Spin Servers is a US-based provider of dedicated servers & affordable private cloud solutions. Our motto is to let you “spin up servers” fast, seamlessly, and affordably.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3